#include<iostream>
using namespace std;
int a[3][3],n;

int main()
{ int i,j,s,p;

cout<<"n=";cin>>n;
for(i=0;i<n;i++)
 for(j=0;j<n;j++)
  { cout<<"a["<<i<<"]["<<j<<"]=";
    cin>>a[i][j];
  }

p=1;
for(i=1;i<n;i++)
 for(j=0;j<i;j++)
   p=p*a[i][j];
s=0;
for(i=0;i<n-1;i++)
  for(j=i+1;j<n;j++)
     s=s+a[i][j];

cout<<"produsul este= ";cout<<p;
cout<<"suma este= ";cout<<s;
}
